load("//tools:defaults.bzl", "js_binary", "ts_project")

package(default_visibility = ["//visibility:public"])

ts_project(
    name = "background-service_lib",
    srcs = glob(["*.ts"]),
    deps = [
        "//:browser-providers",
        "//:node_modules/@types/node",
        "//:node_modules/@types/selenium-webdriver4",
        "//:node_modules/chalk",
        "//:node_modules/selenium-webdriver4",
        "//tools/saucelabs-daemon",
    ],
)

js_binary(
    name = "background-service",
    data = [
        ":background-service_lib",
        "//:sauce_connect",
    ],
    entry_point = ":cli.js",
    fixed_args = [
        "$(rootpath //:sauce_connect)",
    ],
    no_copy_to_bin = [
        "//:sauce_connect",
    ],
)
